#!/bin/bash
# upload a directory of files to Solr
# takes two arguments: serverName and directory
# you must run commit after ingest
FILES=$2/*.xml
for f in $FILES
do
  echo "Processing `pwd`/$f file..."
  curl http://$1/solr/update -F stream.file=`pwd`/$f
done